import java.util.Vector;


public class TaskSplitter {
	public static Vector split(Task t) {
		Vector activities = new Vector();
		
		if(t.getName().equals(Constants.NEW_CUSTOMER_ACCOUNT)) {
			activities.add(new CreateCustomerActivity(t.getProperties()));
		}
		else if (t.getName().equals(Constants.CUSTOMER_LOGIN)) {
			activities.add(new CustomerLoginActivity(t.getProperties()));
			activities.add(new LockAccountActivity(t.getProperties()));
		}
		else if (t.getName().equals(Constants.CUSTOMER_LOGOUT)) {
			activities.add(new CustomerLogoutActivity(t.getProperties()));
		}
		else if (t.getName().equals(Constants.CREATE_TROUBLE_TICKET)) {
			activities.add(new CreateTroubleTicket(t.getProperties()));
			activities.add(new GetCustomerInfoActivity(t.getProperties()));
		}
		else if (t.getName().equals(Constants.REQUEST_INSTALLATION)) {
			activities.add(new RequestInstallationActivity(t.getProperties()));
			activities.add(new GetCustomerInfoActivity(t.getProperties()));
		}
		else if (t.getName().equals(Constants.ACTIVATE_PHONE_SERVICE)) {
			activities.add(new ActivatePhoneServiceActivity(t.getProperties()));
			activities.add(new GetCustomerInfoActivity(t.getProperties()));
		}
	
		return activities;
	}
}
